﻿using System;
using System.Collections.Generic;
using System.Text;
using BarCode.Bean;
using System.IO;
using System.IO.Ports;

namespace BarCode.Common
{
    public class GlobalVal
    {
        /// <summary>
        /// 
        /// </summary>
        public static string Configs_MDB_File = "";

        /// <summary>
        /// MySql数据库访问信息
        /// </summary>
        public static MySqlAccessInfo serverMysqlInfo;

        /// <summary>
        /// 表类型(1：IC卡; 2：物联网表)
        /// </summary>
        public static string MeterType = "1";

        /// <summary>
        /// 数据库服务器系统时间差（单位：小时）
        /// </summary>
        public static int Diff_Hour = 0;

        /// <summary>
        /// 生产线编号
        /// </summary>
        public static string Line_No = "";

        /// <summary>
        /// 工作开始时间
        /// </summary>
        public static int BASE_COUNT = 0;

        /// <summary>
        /// 窗体标题
        /// </summary>
        public static string FORM_TITLE = "";

        /// <summary>
        /// 当前用户
        /// </summary>
        public static UserBean CurrentUser;


        /// <summary>
        /// 备份文件夹路径
        /// </summary>
        public static string BK_PATH = AppDomain.CurrentDomain.BaseDirectory + "DataBF" + Path.DirectorySeparatorChar;


        /// <summary>
        /// 程序启动时是否从服务器加载数据标志
        /// </summary>
        public static string LoadUsers = "1";               // 用户数据


        /// <summary>
        /// 前道工序的表名
        /// </summary>
        public static string PRE_TBL_NAME = "";
        public static string PRE_FIELD = "";

        /// <summary>
        /// 本道工序的表名
        /// </summary>
        public static string CUR_TBL_NAME = "";
        public static string CUR_FIELD = "";

        /// <summary>
        /// 查询前道工序是否存在 最大记录数
        /// </summary>
        public static int PRE_EXIST_RECORD = 1000;
        /// <summary>
        /// 查询本道工序是否重复 最大记录数
        /// </summary>
        public static int CUR_REPEAT_RECORD = 5;


        public static string stationNo = "";

        public static SerialPort ComDevice = new SerialPort(); // 监视器串口


        public static string csvFilePath;

        public static string csvFileName;



    }
}
